namespace GroupSix.Domain.Events;

/// <summary>
/// 用户注册成功事件
/// </summary>
public class UserRegisteredEvent : IDomainEvent
{
    public Guid UserId { get; }
    public string Username { get; }
    public string Email { get; }
    public DateTime RegistrationTime { get; }
    public DateTime OccurredOn { get; }

    public UserRegisteredEvent(Guid userId, string username, string email)
    {
        UserId = userId;
        Username = username;
        Email = email;
        RegistrationTime = DateTime.UtcNow;
        OccurredOn = DateTime.UtcNow;
    }
}

/// <summary>
/// 用户登录成功事件
/// </summary>
public class UserLoginSucceededEvent : IDomainEvent
{
    public Guid UserId { get; }
    public string Username { get; }
    public DateTime LoginTime { get; }
    public DateTime OccurredOn { get; }

    public UserLoginSucceededEvent(Guid userId, string username)
    {
        UserId = userId;
        Username = username;
        LoginTime = DateTime.UtcNow;
        OccurredOn = DateTime.UtcNow;
    }
}

/// <summary>
/// 用户登录失败事件
/// </summary>
public class UserLoginFailedEvent : IDomainEvent
{
    public string Username { get; }
    public DateTime LoginTime { get; }
    public int FailCount { get; }
    public DateTime OccurredOn { get; }

    public UserLoginFailedEvent(string username, int failCount)
    {
        Username = username;
        LoginTime = DateTime.UtcNow;
        FailCount = failCount;
        OccurredOn = DateTime.UtcNow;
    }
}

/// <summary>
/// 用户账户锁定事件
/// </summary>
public class UserAccountLockedEvent : IDomainEvent
{
    public Guid UserId { get; }
    public string Username { get; }
    public DateTime LockoutTime { get; }
    public DateTime LockoutEndTime { get; }
    public DateTime OccurredOn { get; }

    public UserAccountLockedEvent(Guid userId, string username, DateTime lockoutEndTime)
    {
        UserId = userId;
        Username = username;
        LockoutTime = DateTime.UtcNow;
        LockoutEndTime = lockoutEndTime;
        OccurredOn = DateTime.UtcNow;
    }
} 